package com.aaa.ssm.controller;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.List;

/**
 * @ fileName:a
 * @ description:
 * @ author:张圣福
 * @ createTime:2023/10/13 14:45
 * @ version:1.0.0
 */

public class a {
    public static void main(String[] args) {
        List<String> nowDateTo6LaterDayList  =new ArrayList<>();
        LocalDateTime now = LocalDateTime.now();
        DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
        for (int i = 0; i <= 6; i++) {
            LocalDateTime localDateTime = now.plusDays(i);
            nowDateTo6LaterDayList.add(dateTimeFormatter.format(localDateTime));
        }
        System.out.println(nowDateTo6LaterDayList);

    }
}
